Below is a program that will return all installed Windows Services
on a local machine. The program uses the namespace System.ServiceProcess, which can be used by adding the Assemblies System.ServiceProcess.dll
static void Main(string[] args) { System.ServiceProcess.ServiceController[] services = System.ServiceProcess.ServiceController.GetServices(); foreach (System.ServiceProcess.ServiceController service in services) { Console.WriteLine(service.ServiceName); } Console.ReadKey(); }
Happy Coding!
Comments